import Persistent from '../cache';

export function getToken() {
  return getAuthCache('TOKEN_KEY');
}

export function getAuthCache(key: string) {
  const fn = Persistent.getLocal;
  return fn(key);
}

export function setAuthCache(key: string, value: any) {
  const fn = Persistent.setLocal;
  return fn(key, value);
}

export function clearAuthCache(immediate = true) {
  const fn = Persistent.clearLocal;
  return fn();
}
export {};
